/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import net.minecraft.client.Minecraft;
/*     */ import net.minecraft.client.gui.Gui;
/*     */ import net.minecraft.client.gui.GuiButton;
/*     */ import net.minecraft.client.gui.ScaledResolution;
/*     */ import net.minecraft.client.gui.inventory.GuiContainer;
/*     */ import net.minecraft.client.renderer.GlStateManager;
/*     */ import net.minecraft.client.renderer.OpenGlHelper;
/*     */ import net.minecraft.client.renderer.RenderHelper;
/*     */ import net.minecraft.client.renderer.Tessellator;
/*     */ import net.minecraft.init.Items;
/*     */ import net.minecraft.inventory.IInventory;
/*     */ import net.minecraft.inventory.Slot;
/*     */ import net.minecraft.item.ItemStack;
/*     */ import net.minecraft.nbt.NBTTagCompound;
/*     */ import net.minecraft.util.math.MathHelper;
/*     */ import org.lwjgl.input.Mouse;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class jz
/*     */   extends GuiContainer
/*     */   implements da
/*     */ {
/*     */   private eos/moe/dragoncore/dp z;
/*  30 */   private String i = "";
/*     */   
/*  32 */   private na<Float, Float> w = new na<>(Float.valueOf(0.0F), Float.valueOf(0.0F));
/*  33 */   private na<Float, Float> q = new na<>(Float.valueOf(0.0F), Float.valueOf(0.0F));
/*  34 */   private float g = 10.0F;
/*     */   
/*     */   public jz(IInventory iInventory1, IInventory iInventory2) {
/*  37 */     super(new tx(iInventory1, iInventory2));
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public void func_73866_w_() {
/*  44 */     ScaledResolution scaledResolution = new ScaledResolution(this.field_146297_k);
/*  45 */     this.field_146999_f = scaledResolution.func_78326_a();
/*  46 */     this.field_147000_g = scaledResolution.func_78328_b();
/*  47 */     super.func_73866_w_();
/*  48 */     int i = 18; int j;
/*  49 */     for (j = 0; j < 3; j++) {
/*  50 */       for (int m = 0; m < 9; m++) {
/*  51 */         Slot slot = this.field_147002_h.field_75151_b.get(m + j * 9);
/*  52 */         slot.field_75221_f = this.field_146295_m + 1 - 76 - 5 + j * i;
/*     */       } 
/*     */     } 
/*  55 */     for (j = 0; j < 9; j++) {
/*  56 */       Slot slot = this.field_147002_h.field_75151_b.get(j + 27);
/*  57 */       slot.field_75221_f = this.field_146295_m + 1 - 5 - i;
/*     */     } 
/*  59 */     j = this.field_146294_l - 162 - 25;
/*  60 */     int k = this.field_146295_m - 15 - 14 - 15 + 26;
/*  61 */     j = MathHelper.func_76125_a(j, 0, 200);
/*  62 */     this.z = new eos/moe/dragoncore/dp(this, this.field_146294_l - 100, 12, 95, Math.max(0, k), 14, this.field_146294_l, this.field_146295_m, this);
/*     */     
/*  64 */     this.field_146292_n.add(new eos/moe/dragoncore/vq(this, 0, this.field_146294_l / 2 - 20 - 20, this.field_146295_m - 50, "←"));
/*  65 */     this.field_146292_n.add(new eos/moe/dragoncore/vq(this, 0, this.field_146294_l / 2 + 20, this.field_146295_m - 50, "→"));
/*  66 */     this.field_146292_n.add(new eos/moe/dragoncore/vq(this, 0, this.field_146294_l - 120, this.field_146295_m / 2 - 20 - 20, "↑"));
/*  67 */     this.field_146292_n.add(new eos/moe/dragoncore/vq(this, 0, this.field_146294_l - 120, this.field_146295_m / 2 + 20, "↓"));
/*  68 */     this.field_146292_n.add(new eos/moe/dragoncore/vq(this, 0, this.field_146294_l / 2 - 20 - 20, 10, "-"));
/*  69 */     this.field_146292_n.add(new eos/moe/dragoncore/vq(this, 0, this.field_146294_l / 2 + 20, 10, "+"));
/*     */     
/*  71 */     this.field_146292_n.add(new eos/moe/dragoncore/vq(this, 0, 0, this.field_146295_m / 2 - 20, "←←"));
/*  72 */     this.field_146292_n.add(new eos/moe/dragoncore/vq(this, 0, 40, this.field_146295_m / 2 - 20, "→→"));
/*     */     
/*  74 */     this.field_146292_n.add(new eos/moe/dragoncore/vq(this, 0, 20, this.field_146295_m / 2 - 20 - 20, "↑↑"));
/*  75 */     this.field_146292_n.add(new eos/moe/dragoncore/vq(this, 0, 20, this.field_146295_m / 2, "↓↓"));
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public void func_73863_a(int i, int j, float f) {
/*  82 */     super.func_73863_a(i, j, f);
/*  83 */     GlStateManager.func_179094_E();
/*  84 */     GlStateManager.func_179091_B();
/*  85 */     GlStateManager.func_179140_f();
/*  86 */     GlStateManager.func_179097_i();
/*     */     
/*  88 */     OpenGlHelper.func_77475_a(OpenGlHelper.field_77476_b, 240.0F, 240.0F);
/*  89 */     RenderHelper.func_74520_c();
/*     */ 
/*     */     
/*  92 */     GlStateManager.func_179109_b(this.field_146294_l / 3.0F + ((Float)this.q.q).floatValue(), this.field_146295_m / 3.0F + ((Float)this.q.g).floatValue(), 0.0F);
/*     */     
/*  94 */     GlStateManager.func_179109_b(8.0F, 8.0F, 0.0F);
/*  95 */     GlStateManager.func_179114_b(((Float)this.w.g).floatValue(), 1.0F, 0.0F, 0.0F);
/*  96 */     GlStateManager.func_179114_b(((Float)this.w.q).floatValue(), 0.0F, 1.0F, 0.0F);
/*  97 */     GlStateManager.func_179109_b(-8.0F, -8.0F, 0.0F);
/*     */     
/*  99 */     GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F);
/* 100 */     GlStateManager.func_179152_a(this.g, this.g, 0.0F);
/*     */     
/* 102 */     if (this.i != null) {
/* 103 */       this.field_146297_k.func_175599_af().func_175042_a(createItemStack(), 0, 0);
/*     */     }
/* 105 */     GlStateManager.func_179121_F();
/* 106 */     this.z.v(i, j, f);
/*     */   }
/*     */ 
/*     */   
/*     */   public ItemStack createItemStack() {
/* 111 */     ItemStack itemStack = new ItemStack(Items.field_151034_e);
/* 112 */     NBTTagCompound nBTTagCompound = (itemStack.func_77978_p() == null) ? new NBTTagCompound() : itemStack.func_77978_p();
/* 113 */     nBTTagCompound.func_74778_a("itemmodel", this.i);
/* 114 */     itemStack.func_77982_d(nBTTagCompound);
/*     */     
/* 116 */     return itemStack;
/*     */   }
/*     */ 
/*     */ 
/*     */   
/*     */   public void func_146976_a(float f, int i, int j) {}
/*     */ 
/*     */ 
/*     */   
/*     */   public void func_146979_b(int i, int j) {
/* 126 */     func_191948_b(i, j);
/*     */   }
/*     */ 
/*     */   
/*     */   public void drag(String str, int i, int j) {
/* 131 */     Slot slot = getSlotUnderMouse();
/* 132 */     if (slot != null && this.i != null)
/* 133 */       uy.v(slot.getSlotIndex(), this.i); 
/*     */   }
/*     */   
/*     */   public class eos/moe/dragoncore/dp
/*     */     extends bx
/*     */   {
/* 139 */     public int z = -1;
/*     */     
/*     */     private String i;
/*     */     private Minecraft w;
/*     */     private da q;
/*     */     
/*     */     public eos/moe/dragoncore/dp(jz jz1, int i, int j, int k, int m, int n, int i1, int i2, da da1) {
/* 146 */       super(Minecraft.func_71410_x(), k, m, j, j + m, i, n, i1, i2);
/* 147 */       this.w = Minecraft.func_71410_x();
/* 148 */       this.q = da1;
/*     */     }
/*     */ 
/*     */     
/*     */     public int z() {
/* 153 */       return ela.s.z().size();
/*     */     }
/*     */ 
/*     */     
/*     */     public void v(int i, boolean bool) {
/* 158 */       if (i >= ela.s.z().size())
/* 159 */         return;  this.z = i;
/* 160 */       jz.v(this.g, ((ela.eos/moe/dragoncore/uba)ela.s.z().get(this.z)).h());
/* 161 */       this.i = ((ela.eos/moe/dragoncore/uba)ela.s.z().get(this.z)).h();
/*     */     }
/*     */ 
/*     */ 
/*     */     
/*     */     public boolean v(int i) {
/* 167 */       return (this.z == i);
/*     */     }
/*     */ 
/*     */     
/*     */     public void v(int i, int j, float f) {
/* 172 */       super.v(i, j, f);
/* 173 */       if (this.i != null) {
/* 174 */         this.w.field_71466_p.func_78276_b(this.i, i, j, 16777215);
/*     */       }
/* 176 */       if (!Mouse.isButtonDown(0) && this.i != null) {
/* 177 */         this.q.drag(this.i, i, j);
/* 178 */         this.i = null;
/*     */       } 
/*     */     }
/*     */ 
/*     */ 
/*     */ 
/*     */     
/*     */     public void v(int i, int j, int k, int m, boolean bool, Tessellator tessellator) {
/* 186 */       if (i >= ela.s.z().size())
/*     */         return; 
/* 188 */       if (this.z == i) {
/* 189 */         Gui.func_73734_a(this.u + 1, k, this.h, k + 14, -120);
/* 190 */       } else if (bool) {
/* 191 */         Gui.func_73734_a(this.u + 1, k, this.h, k + 14, -3355444);
/*     */       } 
/* 193 */       if (this.z == i) {
/* 194 */         this.w.field_71466_p.func_78276_b(((ela.eos/moe/dragoncore/uba)ela.s.z().get(i)).h(), this.u + 2, k + 2, -16777216);
/*     */       } else {
/* 196 */         this.w.field_71466_p.func_78276_b(((ela.eos/moe/dragoncore/uba)ela.s.z().get(i)).h(), this.u + 2, k + 2, 16777215);
/*     */       } 
/*     */     }
/*     */   }
/*     */   
/*     */   public class eos/moe/dragoncore/vq extends GuiButton {
/*     */     private long q;
/*     */     
/*     */     public eos/moe/dragoncore/vq(jz jz1, int i, int j, int k, String str) {
/* 205 */       super(i, j, k, 20, 20, str);
/*     */     }
/*     */ 
/*     */     
/*     */     public void func_191745_a(Minecraft minecraft, int i, int j, float f) {
/* 210 */       super.func_191745_a(minecraft, i, j, f);
/* 211 */       if (this.q != 0L) {
/* 212 */         na na; long l = System.currentTimeMillis() - this.q;
/* 213 */         float f1 = (float)l / 10.0F;
/* 214 */         switch (this.field_146126_j) {
/*     */           case "↑":
/* 216 */             na = jz.z(this.g); na.g = (B)Float.valueOf(((Float)na.g).floatValue() + f1);
/*     */             break;
/*     */           
/*     */           case "↓":
/* 220 */             na = jz.z(this.g); na.g = (B)Float.valueOf(((Float)na.g).floatValue() - f1);
/*     */             break;
/*     */           
/*     */           case "←":
/* 224 */             na = jz.z(this.g); na.q = (A)Float.valueOf(((Float)na.q).floatValue() - f1);
/*     */             break;
/*     */           
/*     */           case "→":
/* 228 */             na = jz.z(this.g); na.q = (A)Float.valueOf(((Float)na.q).floatValue() + f1);
/*     */             break;
/*     */           
/*     */           case "-":
/* 232 */             jz.v(this.g, jz.v(this.g) - f1 / 10.0F);
/*     */             break;
/*     */           
/*     */           case "+":
/* 236 */             jz.v(this.g, jz.v(this.g) + f1 / 10.0F);
/*     */             break;
/*     */           
/*     */           case "↑↑":
/* 240 */             na = jz.v(this.g); na.g = (B)Float.valueOf(((Float)na.g).floatValue() - f1);
/*     */             break;
/*     */           
/*     */           case "↓↓":
/* 244 */             na = jz.v(this.g); na.g = (B)Float.valueOf(((Float)na.g).floatValue() + f1);
/*     */             break;
/*     */           
/*     */           case "←←":
/* 248 */             na = jz.v(this.g); na.q = (A)Float.valueOf(((Float)na.q).floatValue() - f1);
/*     */             break;
/*     */           
/*     */           case "→→":
/* 252 */             na = jz.v(this.g); na.q = (A)Float.valueOf(((Float)na.q).floatValue() + f1);
/*     */             break;
/*     */         } 
/*     */         
/* 256 */         this.q = System.currentTimeMillis();
/*     */       } 
/*     */     }
/*     */ 
/*     */     
/*     */     public void func_146118_a(int i, int j) {
/* 262 */       this.q = 0L;
/*     */     }
/*     */ 
/*     */     
/*     */     public boolean func_146116_c(Minecraft minecraft, int i, int j) {
/* 267 */       if (super.func_146116_c(minecraft, i, j)) {
/* 268 */         this.q = System.currentTimeMillis();
/*     */       }
/* 270 */       return super.func_146116_c(minecraft, i, j);
/*     */     }
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\jz.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */